﻿Public Class clsShipmentDetail
    Inherits clsBLBase

    ''' <summary>
    ''' Constructor truyền connection string vào BL
    ''' </summary>
    ''' <param name="connectionString">connection string muốn truyền xuống BL</param>
    ''' <remarks>Nguyễn Huy Thường added on 08/07/2012</remarks>
    Public Sub New(ByVal connectionString As String)
        MyBase.New(connectionString)
    End Sub

#Region "Overrides"

    ''' <summary>
    ''' Đặt tên cho bảng hiện đang làm việc là ShipmentDetail
    ''' </summary>
    ''' <remarks>Nguyễn Huy Thường added on 08/06/2011</remarks>
    Protected Overrides Sub SetTableName()
        MyBase.TableName = dsFMS.ShipmentDetail.TableName
    End Sub

    ''' <summary>
    ''' Sub tạo mới một bản ghi trống của bảng ShipmentDetail trên dataset
    ''' </summary>
    ''' <returns>Trả lại một bản ghi trống</returns>
    ''' <remarks>Nguyễn Huy Thường added on 24/10/2010</remarks>
    Public Overrides Function InitNewRow() As System.Data.DataRow
        Dim drNewRow As FMSDataSet.ShipmentDetailRow = dsFMS.ShipmentDetail.NewShipmentDetailRow
        With drNewRow
            .ShipmentDetailID = Guid.NewGuid
            .ShipmentID = Nothing
            .ItemID = Nothing
            .ShipmentDetailQuantity = 0
            .ShipmentDetailBuyPrice = 0
            .ShipmentDetailSellPrice = 0
            .ShipmentDetailAddedDate = Today
            .SetShipmentDetailDeletedDateNull()
            .ShipmentDetailStatus = True
            .SetShipmentDetailDescriptionNull()
        End With
        dsFMS.ShipmentDetail.Rows.Add(drNewRow)
        Return drNewRow
    End Function
#End Region
End Class
